package com.levi.core.impl;

import java.lang.reflect.Method;

import com.levi.core.UrlMapping;
import com.levi.start.ContextInitListener;

public class UrlMappingImpl implements UrlMapping{

	@Override
	public Method mappingUrl(String url, String methodPay) {
		if(url == null) {
			throw new RuntimeException("请求的url不能为空");
		}
		Method method = ContextInitListener.urlMaps.get(url);
		if(method == null) {
			throw new RuntimeException("没有找到该url对应的方法");
		}
		return method;
	}

}
